import { Component,Injectable} from '@angular/core';
import { MyAccountService} from './myAccount.service';
import { user} from '../../services/user/user.service';
import { PersonalInfo} from '../../services/model/personalInfo';
@Component({
    selector: 'my-account',
    templateUrl: './myAccount.component.html',
    styleUrls: ['./myAccount.component.less'],
    providers:[MyAccountService]
})
@Injectable()
export class MyAccountComponent {
  user=user;

  data:PersonalInfo=new PersonalInfo();
  constructor(private svc:MyAccountService){
    this.getInfo();
  }

  getInfo(){
    this.svc.getInfo()
      .then((res)=>{
        if(res.status){
          this.data=res.data;
        }
      });
  }
}
